<template>
	<view style="padding: 30rpx;">
		<!-- 按钮，打印日志 -->
		<button @click="onLog()">Console.log</button>
		<button @click="onLog()">Console.debug</button>
		<button @click="onLog()">Console.info</button>
		<button @click="onLog()">Console.warn</button>
		<button @click="onLog()">Console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myname:"qhl",
				title:"APIs"
			}
		},
		// onLoad(){
		// 	console.log(onLoad);
		// 	// if
		// },
		methods: {
			onLog(){
				// 打印一个日志
				console.log("onLog()--> Name:" + this.myname);
				// console.log(=clog+回车);
				
				// console.log("onLog()" +this.myname,this.title);
				
				// console.log('this.myname', this.myname);
			},
			onDebug(){
				console.debug("onDebug")
			},
			onInfo(){
				console.info("onInfo")
			},
			onWarn(){
				console.warn("onWarn")
				if(true){
					console.log("true");
				}else{
					console.warn("快出错了。。。")
				}
			},
			onError(){
				console.error("onError")
				try{
					
				}catch(e){
					console.error(e)
				}
			}
		}
	}
</script>

<style>

</style>
